home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / VBASIC / T2W32307.ZIP / T2WIN-32.BAS < prev    next >
Encoding:
BASIC Source File  |  1996-09-07  |  90.0 KB  |  1,393 lines

  1. Attribute VB_Name = "T2WIN_32_DEF"
  2. Option Explicit
  3.  
  4. ' object
  5.  
  6. Declare Function cObjectGetBoolean Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Boolean
  7. Declare Function cObjectGetByte Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Byte
  8. Declare Function cObjectGetInteger Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Integer
  9. Declare Function cObjectGetLong Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Long
  10. Declare Function cObjectGetString Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As String
  11. Declare Function cObjectGetStringW Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As String
  12. Declare Function cObjectGetVariant Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Variant
  13. Declare Function cObjectGetIndex Lib "t2win-32.dll" (ByVal Obj As Object) As Integer
  14.  
  15. Declare Function cGetObjCaption Lib "t2win-32.dll" (ByVal Obj As Object) As String
  16. Declare Function cGetObjContainer Lib "t2win-32.dll" (ByVal Obj As Object) As String
  17. Declare Function cGetObjParent Lib "t2win-32.dll" (ByVal Obj As Object) As String
  18. Declare Function cGetObjTag Lib "t2win-32.dll" (ByVal Obj As Object) As String
  19. Declare Function cGetObjText Lib "t2win-32.dll" (ByVal Obj As Object) As String
  20. Declare Function cGetObjDataField Lib "t2win-32.dll" (ByVal Obj As Object) As String
  21. Declare Function cGetObjDataSource Lib "t2win-32.dll" (ByVal Obj As Object) As String
  22. Declare Function cGetObjName Lib "t2win-32.dll" (ByVal Obj As Object) As String
  23. Declare Function cGetObjIndex Lib "t2win-32.dll" (ByVal Obj As Object) As Integer
  24. Declare Function cGetObjNameIndex Lib "t2win-32.dll" (ByVal Obj As Object) As String
  25. Declare Function cGetObjClassName Lib "t2win-32.dll" (ByVal Obj As Object) As String
  26.  
  27. Declare Sub cObjectPutBoolean Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Boolean)
  28. Declare Sub cObjectPutByte Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Byte)
  29. Declare Sub cObjectPutInteger Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Integer)
  30. Declare Sub cObjectPutLong Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Long)
  31. Declare Sub cObjectPutString Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As String)
  32. Declare Sub cObjectPutVariant Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Variant)
  33.  
  34. Declare Sub cPutObjCaption Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  35. Declare Sub cPutObjDataField Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  36. Declare Sub cPutObjDataSource Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  37. Declare Sub cPutObjTag Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  38. Declare Sub cPutObjText Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  39.  
  40. Declare Sub cObjectMethod Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Method As String, ByVal Value As Variant)
  41.  
  42. Declare Sub cDisableFI Lib "t2win-32.dll" (ByVal Obj As Object)
  43. Declare Sub cEnableFI Lib "t2win-32.dll" (ByVal Obj As Object)
  44.  
  45. Declare Function cCloseAllEditForm Lib "t2win-32.dll" () As Integer
  46. Declare Function cHideAllEditForm Lib "t2win-32.dll" () As Integer
  47. Declare Function cHideDebugForm Lib "t2win-32.dll" () As Integer
  48. Declare Function cUnHideAllEditForm Lib "t2win-32.dll" () As Integer
  49. Declare Function cUnHideDebugForm Lib "t2win-32.dll" () As Integer
  50.  
  51. Declare Sub cEnableForm Lib "t2win-32.dll" (ByVal hWnd As Long)
  52. Declare Sub cEnableRedraw Lib "t2win-32.dll" (ByVal hWnd As Long)
  53. Declare Sub cObjEnableRedraw Lib "t2win-32.dll" (ByVal Obj As Object)
  54. Declare Sub cDisableForm Lib "t2win-32.dll" (ByVal hWnd As Long)
  55. Declare Sub cDisableRedraw Lib "t2win-32.dll" (ByVal hWnd As Long)
  56. Declare Sub cObjDisableRedraw Lib "t2win-32.dll" (ByVal Obj As Object)
  57.  
  58. ' windows 95
  59.  
  60. '  structure for windows 95 memory
  61. Type tagMEMORYSTATUS
  62.    dwLength             As Long        'sizeof(MEMORYSTATUS)
  63.    dwMemoryLoad         As Long        'percent of memory in use
  64.    dwTotalPhys          As Long        'bytes of physical memory
  65.    dwAvailPhys          As Long        'free physical memory bytes
  66.    dwTotalPageFile      As Long        'bytes of paging file
  67.    dwAvailPageFile      As Long        'free bytes of paging file
  68.    dwTotalVirtual       As Long        'user bytes of address space
  69.    dwAvailVirtual       As Long        'free user bytes
  70. End Type
  71.  
  72. Declare Sub cMemoryStatus Lib "t2win-32.dll" (MEMORYSTATUS As tagMEMORYSTATUS)
  73. Declare Function cPBFileCopy Lib "t2win-32.dll" (ByVal hWndParent As Long, ByVal FileNameIn As String, ByVal FileNameOut As String) As Integer
  74. Declare Function cDBFileCopy Lib "t2win-32.dll" (ByVal Title As String, ByVal CaptionFrom As String, ByVal CaptionTo As String, ByVal CaptionButton As String, ByVal FileNameIn As String, ByVal FileNameOut As String) As Integer
  75.  
  76. ' file
  77.  
  78. '  definition for error type for ISFileNameVALID
  79. Public Const IFV_ERROR = 0
  80. Public Const IFV_NAME_TOO_LONG = 1
  81. Public Const IFV_EXT_TOO_LONG = 2
  82. Public Const IFV_TOO_MANY_BACKSLASH = 3
  83. Public Const IFV_BAD_DRIVE_LETTER = 4
  84. Public Const IFV_BAD_COLON_POS = 5
  85. Public Const IFV_EXT_WITHOUT_NAME = 6
  86.  
  87. ' definition for sFile attributes
  88. Public Const A_RDONLY = &H1             'Read only file
  89. Public Const A_HIDDEN = &H2             'Hidden file
  90. Public Const A_SYSTEM = &H4             'System file
  91. Public Const A_SUBDIR = &H10            'Subdirectory
  92. Public Const A_ARCHIVE = &H20           'Archive file
  93. Public Const A_NORMAL = &H80            'Normal sFile - No read/write restrictions
  94. Public Const A_COMPRESSED = &H800       'Compressed file
  95. Public Const A_NORMAL_ARCHIVE = &HFE    'Normal, Archive
  96. Public Const A_ALL = &HFF               'Normal, Archive, Read-Only, Hidden, System
  97.  
  98. ' definition for drive type
  99. Public Const DRIVE_UNKNOWN = 0
  100. Public Const DRIVE_NO_ROOT_DIR = 1
  101. Public Const DRIVE_REMOVABLE = 2
  102. Public Const DRIVE_FIXED = 3
  103. Public Const DRIVE_REMOTE = 4
  104. Public Const DRIVE_CDROM = 5
  105. Public Const DRIVE_RAMDISK = 6
  106.  
  107. '  definition for sFile sort
  108. Public Const SORT_ASCENDING = 1
  109. Public Const SORT_DESCENDING = 2
  110. Public Const SORT_CASE_SENSITIVE = 4
  111. Public Const SORT_CASE_INSENSITIVE = 8
  112.  
  113. ' definition for sFile I/O
  114. Public Const EOFILE = -1
  115. Public Const SEEK_CUR = 1
  116. Public Const SEEK_END = 2
  117. Public Const SEEK_SET = 0
  118.  
  119. ' definition for sFile uucp
  120. Public Const MODE_UUENCODE = 0
  121. Public Const MODE_UUDECODE = 1
  122.  
  123. '  structure for sFile attributes
  124. Type FileAttributeType
  125.    ErrNo             As Integer
  126.    Archive           As Integer
  127.    Hidden            As Integer
  128.    Normal            As Integer
  129.    ReadOnly          As Integer
  130.    SubDir            As Integer
  131.    System            As Integer
  132.    Compressed        As Integer
  133. End Type
  134.  
  135. '  structure for split path
  136. Type tagSPLITPATH
  137.    nDrive            As String
  138.    nDir              As String
  139.    nName             As String
  140.    nExt              As String
  141. End Type
  142.  
  143. Declare Function cAllSubDirectories Lib "t2win-32.dll" (ByVal lpBaseDirectory As String, nDir As Long) As String
  144. Declare Function cChDir Lib "t2win-32.dll" (ByVal lpDir As String) As Integer
  145. Declare Function cChDrive Lib "t2win-32.dll" (ByVal lpDrive As String) As Integer
  146. Declare Function cCmpFileAttribute Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Integer
  147. Declare Function cCmpFileContents Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal Sensitivity As Integer) As Integer
  148. Declare Function cCmpFileSize Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Integer
  149. Declare Function cCmpFileTime Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Integer
  150. Declare Function cCountDirectories Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  151. Declare Function cCountFiles Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  152. Declare Function cFileSize Lib "t2win-32.dll" (ByVal lpFilename As String) As Long
  153. Declare Function cIsFilenameValid Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  154. Declare Function cKillDir Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  155. Declare Function cKillDirFilesAll Lib "t2win-32.dll" (ByVal lpDir As String, ByVal lpMask As String) As Integer
  156. Declare Function cKillDirs Lib "t2win-32.dll" (ByVal lpDir As String, ByVal HeaderDirectory As Integer) As Integer
  157. Declare Function cKillFile Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  158. Declare Function cKillFileAll Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  159. Declare Function cKillFiles Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  160. Declare Function cKillFilesAll Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  161. Declare Function cMakeDir Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  162. Declare Function cMakeMultipleDir Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  163. Declare Function cFileResetAllAttrib Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  164. Declare Function cFileResetArchive Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  165. Declare Function cFileResetFlag Lib "t2win-32.dll" (ByVal nFilename As String, ByVal nStatus As Integer) As Integer
  166. Declare Function cFileResetHidden Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  167. Declare Function cFileResetReadOnly Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  168. Declare Function cFileResetSystem Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  169. Declare Function cFileSetAllAttrib Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  170. Declare Function cFileSetArchive Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  171. Declare Function cFileSetAttrib Lib "t2win-32.dll" (ByVal nFilename As String, nFileAttribute As Any) As Integer
  172. Declare Function cFileSetFlag Lib "t2win-32.dll" (ByVal nFilename As String, ByVal nStatus As Integer) As Integer
  173. Declare Function cFileSetHidden Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  174. Declare Function cFileSetReadOnly Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  175. Declare Function cFileSetSystem Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  176. Declare Function cUniqueFileName Lib "t2win-32.dll" (Txt As String) As String
  177. Declare Function cFileCopy Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  178. Declare Function cFileCopy2 Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  179. Declare Function cFileDrive Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  180. Declare Function cFileGetAttrib Lib "t2win-32.dll" (ByVal nFilename As String, nFileAttribute As Any) As Integer
  181. Declare Function cFileMove Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  182. Declare Function cFilePathExists Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  183. Declare Function cFilesSize Lib "t2win-32.dll" (ByVal nFilename As String) As Double
  184. Declare Function cFilesSizeOnDisk Lib "t2win-32.dll" (ByVal nFilename As String) As Double
  185. Declare Function cFilesSlack Lib "t2win-32.dll" (ByVal nFilename As String, Size1 As Double, Size2 As Double) As Integer
  186. Declare Function cGetDiskClusterSize Lib "t2win-32.dll" (ByVal lpDrive As String) As Double
  187. Declare Function cGetDiskFree Lib "t2win-32.dll" (ByVal lpDrive As String) As Double
  188. Declare Function cGetDiskSpace Lib "t2win-32.dll" (ByVal lpDrive As String) As Double
  189. Declare Function cGetDiskUsed Lib "t2win-32.dll" (ByVal lpDrive As String) As Double
  190. Declare Function cRcsCountFileDir Lib "t2win-32.dll" (ByVal FileOrDir As Integer, ByVal FirstFileOrDir As String, ByVal MaskDir As String, ByVal Recurse As Integer) As Integer
  191. Declare Function cRcsFilesSize Lib "t2win-32.dll" (ByVal FirstDir As String, ByVal MaskDir As String, ByVal Recurse As Integer) As Double
  192. Declare Function cRcsFilesSizeOnDisk Lib "t2win-32.dll" (ByVal FirstDir As String, ByVal MaskDir As String, ByVal Recurse As Integer) As Double
  193. Declare Function cRcsFilesSlack Lib "t2win-32.dll" (ByVal FirstDir As String, ByVal MaskDir As String, ByVal Recurse As Integer, Size1 As Double, Size2 As Double) As Integer
  194. Declare Function cSubDirectory Lib "t2win-32.dll" (ByVal nFilename As String, ByVal FirstNext As Integer) As String
  195. Declare Function cFileChangeChars Lib "t2win-32.dll" (ByVal nFilename As String, CharSet As String, NewCharSet As String, ByVal nFileTemp As String) As Long
  196. Declare Function cFileCompressTab Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal nTab As Long) As Long
  197. Declare Function cFileExpandTab Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal nTab As Long) As Long
  198. Declare Function cFileFilter Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, Filter As String) As Long
  199. Declare Function cFileFilterNot Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, Filter As String) As Long
  200. Declare Function cFileLineCount Lib "t2win-32.dll" (ByVal lpFilename As String) As Long
  201. Declare Function cFileMerge Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal fileTo As String) As Long
  202. Declare Function cFileSearch Lib "t2win-32.dll" (ByVal nFilename As String, ByVal Search As String, ByVal Sensitivity As Integer) As Long
  203. Declare Function cFileSearchAndReplace Lib "t2win-32.dll" (ByVal nFilename As String, ByVal Search As String, ByVal Replace As String, ByVal nFileTemp As String, ByVal Sensitivity As Integer) As Long
  204. Declare Function cFileSearchCount Lib "t2win-32.dll" (ByVal nFilename As String, ByVal Search As String, ByVal Sensitivity As Integer) As Long
  205. Declare Function cFileToUpper Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  206. Declare Function cFileToLower Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  207. Declare Function cTruncatePath Lib "t2win-32.dll" (ByVal nFilename As String, ByVal NewLength As Long) As String
  208. Declare Function cFullPath Lib "t2win-32.dll" (ByVal nFilename As String) As String
  209. Declare Function cMakePath Lib "t2win-32.dll" (ByVal nDrive As String, ByVal nDir As String, ByVal nFilename As String, ByVal Ext As String) As String
  210. Declare Function cSplitPath Lib "t2win-32.dll" (ByVal nFilename As String, SPLITPATH As Any) As Integer
  211. Declare Function cFileDateCreated Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  212. Declare Function cFileLastDateAccess Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  213. Declare Function cFileLastDateModified Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  214. Declare Function cFileTimeCreated Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  215. Declare Function cFileLastTimeAccess Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  216. Declare Function cFileLastTimeModified Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  217. Declare Function cGetDriveType Lib "t2win-32.dll" (ByVal lpDrive As String) As Integer
  218. Declare Function cFileSort Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, ByVal SortMethod As Integer, ByVal RecordLength As Long, ByVal KeyOffset As Long, ByVal KeyLength As Long, rRecords As Long) As Long
  219. Declare Function cFileStatistics Lib "t2win-32.dll" (ByVal nFilename As String, nLines As Long, nWords As Long, nChars As Long) As Long
  220. Declare Function cFilesInDirectory Lib "t2win-32.dll" (ByVal nFilename As String, ByVal FirstNext As Integer) As String
  221. Declare Function cFilesInDirOnDisk Lib "t2win-32.dll" (ByVal nFile As String, ByVal nFilename As String, ByVal nAttribute As Integer) As Integer
  222. Declare Function cFilesInDirToArray Lib "t2win-32.dll" (ByVal nFilename As String, ByVal nAttribute As Integer, array() As String) As Integer
  223. Declare Function cRenameFile Lib "t2win-32.dll" (ByVal lpFilename1 As String, ByVal lpFilename2 As String) As Integer
  224. Declare Function cSearchFile Lib "t2win-32.dll" (ByVal lpStartPath As String, ByVal lpFileMask As String, ByVal lpFileResult As String) As Long
  225. Declare Function cFileUUCP Lib "t2win-32.dll" (ByVal lpFilename1 As String, ByVal lpFilename2 As String, ByVal EncodeDecode As Integer) As Long
  226.  
  227. ' binary
  228.  
  229. Declare Function cCreateBits Lib "t2win-32.dll" (ByVal nBits As Long) As String
  230. Declare Function cFindBitReset Lib "t2win-32.dll" (Txt As String, ByVal Position As Long) As Long
  231. Declare Function cFindBitSet Lib "t2win-32.dll" (Txt As String, ByVal Position As Long) As Long
  232. Declare Function cGetBit Lib "t2win-32.dll" (Txt As String, ByVal Position As Long) As Integer
  233. Declare Function cGetBitB Lib "t2win-32.dll" (ByVal Value As Byte, ByVal Position As Integer) As Integer
  234. Declare Function cGetBitD Lib "t2win-32.dll" (ByVal Value As Double, ByVal Position As Integer) As Integer
  235. Declare Function cGetBitI Lib "t2win-32.dll" (ByVal Value As Integer, ByVal Position As Integer) As Integer
  236. Declare Function cGetBitL Lib "t2win-32.dll" (ByVal Value As Long, ByVal Position As Integer) As Integer
  237. Declare Function cGetBitS Lib "t2win-32.dll" (ByVal Value As Single, ByVal Position As Integer) As Integer
  238. Declare Function cGiveBitPalindrome Lib "t2win-32.dll" () As String
  239. Declare Function cIsBitPalindrome Lib "t2win-32.dll" (Txt As String) As Integer
  240. Declare Sub cReverseAllBits Lib "t2win-32.dll" (Txt As String)
  241. Declare Sub cReverseAllBitsByChar Lib "t2win-32.dll" (Txt As String)
  242. Declare Sub cSetAllBits Lib "t2win-32.dll" (Txt As String, ByVal Value As Integer)
  243. Declare Sub cSetBit Lib "t2win-32.dll" (Txt As String, ByVal Position As Long, ByVal Value As Integer)
  244. Declare Sub cSetBitToFalse Lib "t2win-32.dll" (Txt As String, ByVal Position As Long)
  245. Declare Sub cSetBitToTrue Lib "t2win-32.dll" (Txt As String, ByVal Position As Long)
  246. Declare Sub cSetBitB Lib "t2win-32.dll" (Value As Byte, ByVal Position As Integer, ByVal BitValue As Integer)
  247. Declare Sub cSetBitD Lib "t2win-32.dll" (Value As Double, ByVal Position As Integer, ByVal BitValue As Integer)
  248. Declare Sub cSetBitI Lib "t2win-32.dll" (Value As Integer, ByVal Position As Integer, ByVal BitValue As Integer)
  249. Declare Sub cSetBitL Lib "t2win-32.dll" (Value As Long, ByVal Position As Integer, ByVal BitValue As Integer)
  250. Declare Sub cSetBitS Lib "t2win-32.dll" (Value As Single, ByVal Position As Integer, ByVal BitValue As Integer)
  251. Declare Sub cToggleAllBits Lib "t2win-32.dll" (Txt As String)
  252. Declare Sub cToggleBit Lib "t2win-32.dll" (Txt As String, ByVal Position As Long)
  253. Declare Function cB2I Lib "t2win-32.dll" (ByVal Txt As String) As Integer
  254. Declare Function cB2L Lib "t2win-32.dll" (ByVal Txt As String) As Long
  255. Declare Function cI2B Lib "t2win-32.dll" (ByVal Value As Integer) As String
  256. Declare Function cL2B Lib "t2win-32.dll" (ByVal Value As Long) As String
  257. Declare Function cFromBinary Lib "t2win-32.dll" (Text As String) As String
  258. Declare Function cFromBinary2 Lib "t2win-32.dll" (Text As String, Bin As String) As String
  259. Declare Function cToBinary Lib "t2win-32.dll" (Text As String) As String
  260. Declare Function cToBinary2 Lib "t2win-32.dll" (Text As String, Bin As String) As String
  261.  
  262. ' compress
  263.  
  264. Public Const CMPEXP_FILEIN_CANT_BE_NULL = -1
  265. Public Const CMPEXP_FILEOUT_CANT_BE_NULL = -2
  266. Public Const CMPEXP_FILEIN_AND_FILEOUT_CANT_BE_THE_SAME = -3
  267. Public Const CMPEXP_FILEIN_CANT_BE_OPENED = -4
  268. Public Const CMPEXP_FILEOUT_CANT_BE_CREATED = -5
  269. Public Const CMPEXP_COMPRESS_OR_EXPAND_ERROR = -6
  270. Public Const CMPEXP_CANT_GET_FILEOUT_SIZE = -7
  271.  
  272. Declare Function cASHFileCompress Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal order As Integer) As Long
  273. Declare Function cASHFileExpand Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal order As Integer) As Long
  274. Declare Function cFileCompress Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  275. Declare Function cFileExpand Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  276. Declare Function cGZIPFileCompress Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  277. Declare Function cGZIPFileExpand Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  278. Declare Function cGZIPStringCompress Lib "t2win-32.dll" (Txt As String) As String
  279. Declare Function cGZIPStringExpand Lib "t2win-32.dll" (Txt As String) As String
  280. Declare Function cLZARIcompress Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  281. Declare Function cLZARIexpand Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  282. Declare Function cStringCompress Lib "t2win-32.dll" (Txt As String) As String
  283. Declare Function cStringExpand Lib "t2win-32.dll" (Txt As String) As String
  284.  
  285. ' timer
  286.  
  287. Declare Function cCheckWait Lib "t2win-32.dll" (ByVal nTimer As Integer) As Integer
  288. Declare Function cReadBasisTimer Lib "t2win-32.dll" () As Long
  289. Declare Function cReadTimer Lib "t2win-32.dll" (ByVal nTimer As Integer) As Long
  290. Declare Sub cSetWait Lib "t2win-32.dll" (ByVal nTimer As Integer, ByVal nValue As Long)
  291. Declare Function cSleep Lib "t2win-32.dll" (ByVal delay As Long) As Integer
  292. Declare Sub cStartBasisTimer Lib "t2win-32.dll" ()
  293. Declare Sub cStartTimer Lib "t2win-32.dll" (ByVal nTimer As Integer)
  294. Declare Sub cStartWait Lib "t2win-32.dll" (ByVal nTimer As Integer)
  295. Declare Sub cStopBasisTimer Lib "t2win-32.dll" ()
  296. Declare Function cStopTimer Lib "t2win-32.dll" (ByVal nTimer As Integer) As Long
  297. Declare Function cTimerClose Lib "t2win-32.dll" (ByVal TimerHandle As Integer) As Integer
  298. Declare Function cTimerOpen Lib "t2win-32.dll" () As Integer
  299. Declare Function cTimerRead Lib "t2win-32.dll" (ByVal TimerHandle As Integer) As Long
  300. Declare Function cTimerStart Lib "t2win-32.dll" (ByVal TimerHandle As Integer) As Integer
  301.  
  302. ' array
  303.  
  304. '  definition for array on disk
  305. Public Const PUT_ARRAY_ON_DISK = 0
  306. Public Const GET_ARRAY_ON_DISK = 1
  307.  
  308. '  structure for VB array
  309. Type ArrayType
  310.    Bounds            As Long
  311.    LBound            As Integer
  312.    UBound            As Integer
  313.    ElemSize          As Integer
  314.    IndexCount        As Integer
  315.    TotalElem         As Integer
  316. End Type
  317.  
  318. Declare Function cAddD Lib "t2win-32.dll" (array() As Double, ByVal nValue As Double) As Integer
  319. Declare Function cAddI Lib "t2win-32.dll" (array() As Integer, ByVal nValue As Integer) As Integer
  320. Declare Function cAddL Lib "t2win-32.dll" (array() As Long, ByVal nValue As Long) As Integer
  321. Declare Function cAddS Lib "t2win-32.dll" (array() As Single, ByVal nValue As Single) As Integer
  322. Declare Function cArrayOnDisk Lib "t2win-32.dll" (ByVal sFile As String, array() As Any, ByVal GetPut As Integer) As Long
  323. Declare Function cArrayPrm Lib "t2win-32.dll" (array() As Any, nArray As ArrayType) As Integer
  324. Declare Function cArrayStringOnDisk Lib "t2win-32.dll" (ByVal sFile As String, array() As String, ByVal GetPut As Integer, rRecords As Long) As Long
  325. Declare Function cCountD Lib "t2win-32.dll" (array() As Double, ByVal Value As Double) As Long
  326. Declare Function cCountI Lib "t2win-32.dll" (array() As Integer, ByVal Value As Integer) As Long
  327. Declare Function cCountL Lib "t2win-32.dll" (array() As Long, ByVal Value As Long) As Long
  328. Declare Function cCountS Lib "t2win-32.dll" (array() As Single, ByVal Value As Single) As Long
  329. Declare Function cDeviationD Lib "t2win-32.dll" (array() As Double) As Double
  330. Declare Function cDeviationI Lib "t2win-32.dll" (array() As Integer) As Double
  331. Declare Function cDeviationL Lib "t2win-32.dll" (array() As Long) As Double
  332. Declare Function cDeviationS Lib "t2win-32.dll" (array() As Single) As Double
  333. Declare Function cFillD Lib "t2win-32.dll" (array() As Double, ByVal nValue As Double) As Integer
  334. Declare Function cFillI Lib "t2win-32.dll" (array() As Integer, ByVal nValue As Integer) As Integer
  335. Declare Function cFillL Lib "t2win-32.dll" (array() As Long, ByVal nValue As Long) As Integer
  336. Declare Function cFillS Lib "t2win-32.dll" (array() As Single, ByVal nValue As Single) As Integer
  337. Declare Function cFillIncrD Lib "t2win-32.dll" (array() As Double, ByVal nValue As Double, ByVal Increment As Double) As Integer
  338. Declare Function cFillIncrI Lib "t2win-32.dll" (array() As Integer, ByVal nValue As Integer, ByVal Increment As Integer) As Integer
  339. Declare Function cFillIncrL Lib "t2win-32.dll" (array() As Long, ByVal nValue As Long, ByVal Increment As Long) As Integer
  340. Declare Function cFillIncrS Lib "t2win-32.dll" (array() As Single, ByVal nValue As Single, ByVal Increment As Single) As Integer
  341. Declare Function cMaxD Lib "t2win-32.dll" (array() As Double) As Double
  342. Declare Function cMaxI Lib "t2win-32.dll" (array() As Integer) As Integer
  343. Declare Function cMaxL Lib "t2win-32.dll" (array() As Long) As Long
  344. Declare Function cMaxS Lib "t2win-32.dll" (array() As Single) As Single
  345. Declare Function cMeanD Lib "t2win-32.dll" (array() As Double) As Double
  346. Declare Function cMeanI Lib "t2win-32.dll" (array() As Integer) As Double
  347. Declare Function cMeanL Lib "t2win-32.dll" (array() As Long) As Double
  348. Declare Function cMeanS Lib "t2win-32.dll" (array() As Single) As Double
  349. Declare Function cMinD Lib "t2win-32.dll" (array() As Double) As Double
  350. Declare Function cMinI Lib "t2win-32.dll" (array() As Integer) As Integer
  351. Declare Function cMinL Lib "t2win-32.dll" (array() As Long) As Long
  352. Declare Function cMinS Lib "t2win-32.dll" (array() As Single) As Single
  353. Declare Function cReverseSortD Lib "t2win-32.dll" (array() As Double) As Integer
  354. Declare Function cReverseSortI Lib "t2win-32.dll" (array() As Integer) As Integer
  355. Declare Function cReverseSortL Lib "t2win-32.dll" (array() As Long) As Integer
  356. Declare Function cReverseSortS Lib "t2win-32.dll" (array() As Single) As Integer
  357. Declare Function cSearchI Lib "t2win-32.dll" (array() As Integer, ByVal Value As Integer) As Long
  358. Declare Function cSearchL Lib "t2win-32.dll" (array() As Long, ByVal Value As Long) As Long
  359. Declare Function cSearchS Lib "t2win-32.dll" (array() As Single, ByVal Value As Single) As Long
  360. Declare Function cSearchD Lib "t2win-32.dll" (array() As Double, ByVal Value As Double) As Long
  361. Declare Function cSetD Lib "t2win-32.dll" (array() As Double, ByVal nValue As Double) As Integer
  362. Declare Function cSetI Lib "t2win-32.dll" (array() As Integer, ByVal nValue As Integer) As Integer
  363. Declare Function cSetL Lib "t2win-32.dll" (array() As Long, ByVal nValue As Long) As Integer
  364. Declare Function cSetS Lib "t2win-32.dll" (array() As Single, ByVal nValue As Single) As Integer
  365. Declare Function cSortD Lib "t2win-32.dll" (array() As Double) As Integer
  366. Declare Function cSortI Lib "t2win-32.dll" (array() As Integer) As Integer
  367. Declare Function cSortL Lib "t2win-32.dll" (array() As Long) As Integer
  368. Declare Function cSortS Lib "t2win-32.dll" (array() As Single) As Integer
  369. Declare Function cSumD Lib "t2win-32.dll" (array() As Double) As Double
  370. Declare Function cSumI Lib "t2win-32.dll" (array() As Integer) As Double
  371. Declare Function cSumL Lib "t2win-32.dll" (array() As Long) As Double
  372. Declare Function cSumS Lib "t2win-32.dll" (array() As Single) As Double
  373.  
  374. ' ieeenum
  375.  
  376. Declare Function cCVB Lib "t2win-32.dll" (Value As String) As Byte
  377. Declare Function cCVC Lib "t2win-32.dll" (Value As String) As Currency
  378. Declare Function cCVD Lib "t2win-32.dll" (Value As String) As Double
  379. Declare Function cCVI Lib "t2win-32.dll" (Value As String) As Integer
  380. Declare Function cCVL Lib "t2win-32.dll" (Value As String) As Long
  381. Declare Function cCVS Lib "t2win-32.dll" (Value As String) As Single
  382. Declare Function cMKB Lib "t2win-32.dll" (ByVal Value As Byte) As String
  383. Declare Function cMKC Lib "t2win-32.dll" (ByVal Value As Currency) As String
  384. Declare Function cMKD Lib "t2win-32.dll" (ByVal Value As Double) As String
  385. Declare Function cMKI Lib "t2win-32.dll" (ByVal Value As Integer) As String
  386. Declare Function cMKL Lib "t2win-32.dll" (ByVal Value As Long) As String
  387. Declare Function cMKN Lib "t2win-32.dll" (ByVal Value As String) As String
  388. Declare Function cMKS Lib "t2win-32.dll" (ByVal Value As Single) As String
  389.  
  390. ' disk array
  391.  
  392. '  structure for disk array
  393. Type tagDISKARRAY
  394.    daSize            As Integer           'size of the type'd
  395.    signature         As String * 7        'signature
  396.    nFilename         As String * 128      'name of the file
  397.    nType             As Integer           'variable type
  398.    nRows             As Long              'number of rows
  399.    nCols             As Long              'number of cols
  400.    nSheets           As Long              'number of sheets
  401.    rHandle           As Long              'returned handle for use with other functions
  402.    rElementSize      As Long              'returned size of a element
  403.    rFileSize         As Long              'returned size of the file
  404.    rParts            As Long              'returned total part
  405.    rRemain           As Long              'returned size of the remain part
  406.    rSheetSize        As Long              'size of a sheet
  407.    rOffset1          As Long              'returned offset 1
  408.    rOffset2          As Long              'returned offset 2
  409.    rTime             As Long              'time for the last correct transaction
  410.    nIsTyped          As Integer           'is nType a type'd variable
  411.    Dummy             As String * 7        'reserved for future use
  412. End Type
  413.  
  414. '  definition for variable type in DISK ARRAY
  415. Public Const DA_TYPE = 0
  416. Public Const DA_BYTE = -1
  417. Public Const DA_INTEGER = -2
  418. Public Const DA_LONG = -3
  419. Public Const DA_SINGLE = -4
  420. Public Const DA_DOUBLE = -5
  421. Public Const DA_CURRENCY = -6
  422.  
  423. '  definition for error type in DISK ARRAY
  424. Public Const DA_NO_ERROR = True
  425. Public Const DA_EMPTY_FILENAME = 1
  426. Public Const DA_BAD_FILENAME = 2
  427. Public Const DA_CAN_KILL_FILE = 3
  428. Public Const DA_CAN_NOT_OPEN_FILE = 4
  429. Public Const DA_FILE_NOT_FOUND = 5
  430. Public Const DA_BAD_TYPE = 6
  431. Public Const DA_BAD_ROWS = 7
  432. Public Const DA_BAD_COLS = 8
  433. Public Const DA_BAD_SHEETS = 9
  434. Public Const DA_CAN_NOT_WRITE_HEADER = 10
  435. Public Const DA_CAN_NOT_WRITE_PART = 11
  436. Public Const DA_CAN_NOT_WRITE_REMAIN = 12
  437. Public Const DA_CAN_NOT_READ_HEADER = 13
  438. Public Const DA_HEADER_SIZE = 14
  439. Public Const DA_BAD_SIGNATURE = 15
  440. Public Const DA_FILE_SIZE_MISMATCH = 16
  441. Public Const DA_CAN_NOT_SEEK = 17
  442. Public Const DA_INVALID_HANDLE = 18
  443. Public Const DA_CAN_NOT_READ_PART = 19
  444. Public Const DA_CAN_NOT_READ_REMAIN = 20
  445.  
  446. Declare Function cDAClear Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY) As Integer
  447. Declare Function cDAClearCol Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, ByVal sheet As Long) As Integer
  448. Declare Function cDAClearRow Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal sheet As Long) As Integer
  449. Declare Function cDAClearSheet Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal sheet As Long) As Integer
  450. Declare Sub cDAClose Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal DeleteFile As Integer)
  451. Declare Function cDACreate Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal CreateOrUse As Integer) As Integer
  452. Declare Function cDAGet Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long) As Variant
  453. Declare Sub cDAGetType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  454. Declare Sub cDAPut Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, Var As Variant)
  455. Declare Sub cDAPutType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  456. Declare Sub cDArGet Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, Var As Variant)
  457. Declare Sub cDArGetType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, nType As Any)
  458. Declare Sub cDArPut Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, Var As Variant)
  459. Declare Sub cDArPutType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, nType As Any)
  460. Declare Function cDAsClearCol Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long) As Integer
  461. Declare Function cDAsClearRow Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long) As Integer
  462. Declare Sub cDAsGet Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  463. Declare Sub cDAsGetType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, nType As Any)
  464. Declare Sub cDAsPut Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  465. Declare Sub cDAsPutType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, nType As Any)
  466.  
  467. ' huge memory array
  468.  
  469. '  structure for huge memory array
  470. Type tagHMA
  471.    daSize            As Integer           'size of the type'd
  472.    nType             As Integer           'variable type
  473.    nRows             As Long              'number of rows
  474.    nCols             As Long              'number of cols
  475.    nSheets           As Long              'number of sheets
  476.    rHandle           As Long              'returned handle for use with other functions
  477.    rElementSize      As Long              'returned size of a element
  478.    rMemorySize       As Long              'returned size of the memory used
  479.    rParts            As Long              'returned total part
  480.    rRemain           As Long              'returned size of the remain part
  481.    rSheetSize        As Long              'size of a sheet
  482.    rOffset           As Long              'returned offset
  483.    nIsTyped          As Integer           'is nType a type'd variable
  484.    Dummy             As String * 20       'reserved for future use
  485. End Type
  486.  
  487. '  definition for variable type in HUGE MEMORY ARRAY
  488. Public Const HMA_TYPE = 0
  489. Public Const HMA_BYTE = -1
  490. Public Const HMA_INTEGER = -2
  491. Public Const HMA_LONG = -3
  492. Public Const HMA_SINGLE = -4
  493. Public Const HMA_DOUBLE = -5
  494. Public Const HMA_CURRENCY = -6
  495.  
  496. '  definition for error type in HUGE MEMORY ARRAY
  497. Public Const HMA_NO_ERROR = True
  498. Public Const HMA_NO_MEMORY = 1
  499. Public Const HMA_BAD_TYPE = 2
  500. Public Const HMA_BAD_ROWS = 3
  501. Public Const HMA_BAD_COLS = 4
  502. Public Const HMA_BAD_SHEETS = 5
  503. Public Const HMA_INVALID_HANDLE = 6
  504.  
  505. Declare Function cHMAClear Lib "t2win-32.dll" (HMA As tagHMA) As Integer
  506. Declare Function cHMAClearCol Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, ByVal sheet As Long) As Integer
  507. Declare Function cHMAClearRow Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal sheet As Long) As Integer
  508. Declare Function cHMAClearSheet Lib "t2win-32.dll" (HMA As tagHMA, ByVal sheet As Long) As Integer
  509. Declare Function cHMACreate Lib "t2win-32.dll" (HMA As tagHMA) As Integer
  510. Declare Function cHMAFree Lib "t2win-32.dll" (HMA As tagHMA) As Integer
  511. Declare Function cHMAGet Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long) As Variant
  512. Declare Sub cHMAGetType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  513. Declare Sub cHMAPut Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, Var As Variant)
  514. Declare Sub cHMAPutType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  515. Declare Sub cHMArGet Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, Var As Variant)
  516. Declare Sub cHMArGetType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, nType As Any)
  517. Declare Sub cHMArPut Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, Var As Variant)
  518. Declare Sub cHMArPutType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, nType As Any)
  519. Declare Sub cHMAsGet Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  520. Declare Sub cHMAsGetType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, nType As Any)
  521. Declare Sub cHMAsPut Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  522. Declare Sub cHMAsPutType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, nType As Any)
  523. Declare Function cHMAsClearCol Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long) As Integer
  524. Declare Function cHMAsClearRow Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long) As Integer
  525. Declare Function cHMAOnDisk Lib "t2win-32.dll" (HMA As tagHMA, ByVal hsFile As String, ByVal hsGetPut As Integer) As Long
  526.  
  527. '  structure for multiple disk array
  528. Type tagMULTIPLEDISKARRAY
  529.    daSize               As Integer        'size of the structure
  530.    signature            As String * 7     'signature
  531.    nFilename            As String * 128   'name of the file
  532.    nType(1 To 20)       As Integer        'standard variable type (for 20 arrays)
  533.    nIsTyped(1 To 20)    As Integer        'is a type'd (for 20 arrays)
  534.    nRows(1 To 20)       As Long           'number of rows (for 20 arrays)
  535.    nCols(1 To 20)       As Long           'number of cols (for 20 arrays)
  536.    nSheets(1 To 20)     As Long           'number of sheets (for 20 arrays)
  537.    rHandle              As Long           'returned handle for use with other functions
  538.    rFileSize            As Long           'returned size of the file
  539.    rElementSz(1 To 20)  As Long           'returned size of a element (for 20 arrays)
  540.    rSheetSz(1 To 20)    As Long           'size of a sheet (for 20 arrays)
  541.    rOffsetPos(1 To 20)  As Long           'position of each array in the sFile (for 20 arrays)
  542.    rOffset1             As Long           'returned offset 1
  543.    rOffset2             As Long           'returned offset 2
  544.    rTime                As Long           'time for the last correct transaction
  545.    Dummy                As String * 28    'reserved for future use
  546. End Type
  547.  
  548. '  definition for variable type in HUGE MEMORY ARRAY
  549. Public Const MDA_TYPE = 0
  550. Public Const MDA_BYTE = -1
  551. Public Const MDA_INTEGER = -2
  552. Public Const MDA_LONG = -3
  553. Public Const MDA_SINGLE = -4
  554. Public Const MDA_DOUBLE = -5
  555. Public Const MDA_CURRENCY = -6
  556.  
  557. '  definition for error type in MULTIPLE DISK ARRAY
  558. Public Const MDA_NO_ERROR = -1
  559. Public Const MDA_EMPTY_FileName = 1
  560. Public Const MDA_BAD_FileName = 2
  561. Public Const MDA_CAN_KILL_FILE = 3
  562. Public Const MDA_CAN_NOT_OPEN_FILE = 4
  563. Public Const MDA_FILE_NOT_FOUND = 5
  564. Public Const MDA_BAD_TYPE = 6
  565. Public Const MDA_BAD_ROWS = 7
  566. Public Const MDA_BAD_COLS = 8
  567. Public Const MDA_BAD_SHEETS = 9
  568. Public Const MDA_CAN_NOT_WRITE_HEADER = 10
  569. Public Const MDA_CAN_NOT_WRITE_PART = 11
  570. Public Const MDA_CAN_NOT_WRITE_REMAIN = 12
  571. Public Const MDA_CAN_NOT_READ_HEADER = 13
  572. Public Const MDA_HEADER_SIZE = 14
  573. Public Const MDA_BAD_SIGNATURE = 15
  574. Public Const MDA_FILE_SIZE_MISMATCH = 16
  575. Public Const MDA_CAN_NOT_SEEK = 17
  576. Public Const MDA_INVALID_HANDLE = 18
  577. Public Const MDA_CAN_NOT_READ_PART = 19
  578. Public Const MDA_CAN_NOT_READ_REMAIN = 20
  579. Public Const MDA_BAD_MULTIPLE_ARRAY = 21
  580.  
  581. Declare Function cMDAClear Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY) As Integer
  582. Declare Function cMDAClearCol Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, ByVal sheet As Long) As Integer
  583. Declare Function cMDAClearRow Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal sheet As Long) As Integer
  584. Declare Function cMDAClearSheet Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal sheet As Long) As Integer
  585. Declare Sub cMDAClose Lib "t2win-32.dll" (MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal DeleteFile As Integer)
  586. Declare Function cMDACreate Lib "t2win-32.dll" (MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal CreateOrUse As Integer) As Integer
  587. Declare Function cMDAGet Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long) As Variant
  588. Declare Sub cMDAGetType Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  589. Declare Sub cMDAPut Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, Var As Variant)
  590. Declare Sub cMDAPutType Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  591. Declare Sub cMDArGet Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, Var As Variant)
  592. Declare Sub cMDArGetType Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, nType As Any)
  593. Declare Sub cMDArPut Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, Var As Variant)
  594. Declare Sub cMDArPutType Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, nType As Any)
  595. Declare Function cMDAsClearCol Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long) As Integer
  596. Declare Function cMDAsClearRow Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long) As Integer
  597. Declare Sub cMDAsGet Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  598. Declare Sub cMDAsGetType Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, nType As Any)
  599. Declare Sub cMDAsPut Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  600. Declare Sub cMDAsPutType Lib "t2win-32.dll" (ByVal array As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, nType As Any)
  601.  
  602. ' serialization
  603.  
  604. '  structure for serialization
  605. Type tagSERIALDATA
  606.    Description1      As String * 52       'serialization description 1
  607.    Description2      As String * 52       'serialization description 2
  608.    Number            As Long              'serialization number
  609.    Dummy             As String * 52       'reserved for future use
  610. End Type
  611.  
  612. '  definition for error type in SERIAL DATA
  613. Public Const SD_SERIAL_NOT_FOUND = 1
  614. Public Const SD_CAN_NOT_OPEN_FILE = 2
  615.  
  616. Declare Function cIsSerial Lib "t2win-32.dll" (ByVal sFile As String) As Integer
  617. Declare Function cSerialGet Lib "t2win-32.dll" (ByVal sFile As String, SERIALDATA As tagSERIALDATA) As Integer
  618. Declare Function cSerialInc Lib "t2win-32.dll" (ByVal sFile As String, ByVal Increment As Long) As Integer
  619. Declare Function cSerialPut Lib "t2win-32.dll" (ByVal sFile As String, SERIALDATA As tagSERIALDATA) As Integer
  620. Declare Function cSerialRmv Lib "t2win-32.dll" (ByVal sFile As String) As Integer
  621.  
  622. ' language control
  623.  
  624. '  definition for properties for language management
  625. Public Const RS_CAPTION = 1
  626. Public Const RS_TEXT = 2
  627. Public Const RS_DATAFIELD = 4
  628. Public Const RS_DATASOURCE = 8
  629. Public Const RS_TAG = 16
  630. Public Const RS_MENU = 32
  631. Public Const RS_ALL = 255
  632.  
  633. Declare Function cReadCtlLanguage Lib "t2win-32.dll" (ByVal Frm As Form, ByVal Property As Integer, ByVal FileLanguage As String) As Integer
  634. Declare Function cReadCtlLanguageExt Lib "t2win-32.dll" (ByVal Frm As Form, ByVal Property As Integer, ByVal FileLanguage As String) As Integer
  635. Declare Function cSaveCtlLanguage Lib "t2win-32.dll" (ByVal Frm As Form, ByVal Property As Integer, ByVal FileLanguage As String) As Integer
  636. Declare Function cSaveCtlLanguageExt Lib "t2win-32.dll" (ByVal Frm As Form, ByVal Property As Integer, ByVal FileLanguage As String) As Integer
  637.  
  638. ' interest rate
  639. Declare Function cAtoF Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  640. Declare Function cAtoFC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  641. Declare Function cAtoP Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  642. Declare Function cAtoPC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  643. Declare Function cFtoA Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  644. Declare Function cFtoAC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  645. Declare Function cFtoP Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  646. Declare Function cFtoPC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  647. Declare Function cPtoA Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  648. Declare Function cPtoAC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  649. Declare Function cPtoF Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  650. Declare Function cPtoFC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  651.  
  652. ' matrix
  653.  
  654. '  definition for matrix fill
  655. Public Const MATRIX_ZERO = 0
  656. Public Const MATRIX_UNIT = 1
  657.  
  658. Declare Sub cMatrixAdd Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayB() As Double, ArrayC() As Double)
  659. Declare Function cMatrixCoFactor Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ByVal Row As Integer, ByVal Col As Integer) As Double
  660. Declare Function cMatrixCompare Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double) As Integer
  661. Declare Sub cMatrixCopy Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double)
  662. Declare Function cMatrixDet Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double) As Double
  663. Declare Function cMatrixFill Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ByVal nInit As Integer) As Integer
  664. Declare Function cMatrixInv Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double) As Integer
  665. Declare Function cMatrixMinor Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ByVal Row As Integer, ByVal Col As Integer) As Double
  666. Declare Sub cMatrixMul Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayB() As Double, ArrayC() As Double)
  667. Declare Sub cMatrixSub Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayB() As Double, ArrayC() As Double)
  668. Declare Function cMatrixSymToeplitz Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double) As Integer
  669. Declare Sub cMatrixTranspose Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double)
  670.  
  671. ' is
  672.  
  673. Declare Function cIsAlnum Lib "t2win-32.dll" (Txt As String) As Integer
  674. Declare Function cIsAlpha Lib "t2win-32.dll" (Txt As String) As Integer
  675. Declare Function cIsAscii Lib "t2win-32.dll" (Txt As String) As Integer
  676. Declare Function cIsBalance Lib "t2win-32.dll" (ByVal nHour As Long, ByVal nMinute As Integer, ByVal nSecond As Integer) As Integer
  677. Declare Function cIsCsym Lib "t2win-32.dll" (Txt As String) As Integer
  678. Declare Function cIsCsymf Lib "t2win-32.dll" (Txt As String) As Integer
  679. Declare Function cIsDate Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer) As Integer
  680. Declare Function cIsDigit Lib "t2win-32.dll" (Txt As String) As Integer
  681. Declare Function cIsFileArchive Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  682. Declare Function cIsFileEmpty Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  683. Declare Function cIsFileFlag Lib "t2win-32.dll" (ByVal nFilename As String, ByVal nStatus As Integer) As Integer
  684. Declare Function cIsFileHidden Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  685. Declare Function cIsFileNormal Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  686. Declare Function cIsFileReadOnly Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  687. Declare Function cIsFileSubDir Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  688. Declare Function cIsFileSystem Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  689. Declare Function cIsFileCompressed Lib "t2win-32.dll" (ByVal nFilename As String) As Integer
  690. Declare Function cIsFormEnabled Lib "t2win-32.dll" (ByVal hWnd As Long) As Integer
  691. Declare Function cIsHour Lib "t2win-32.dll" (ByVal nHour As Integer, ByVal nMinute As Integer, ByVal nSecond As Integer) As Integer
  692. Declare Function cIsISBN Lib "t2win-32.dll" (Txt As String) As Integer
  693. Declare Function cIsLeapYear Lib "t2win-32.dll" (ByVal nYear As Integer) As Integer
  694. Declare Function cIsLower Lib "t2win-32.dll" (Txt As String) As Integer
  695. Declare Function cIsPalindrome Lib "t2win-32.dll" (Txt As String) As Integer
  696. Declare Function cIsPunct Lib "t2win-32.dll" (Txt As String) As Integer
  697. Declare Function cIsSpace Lib "t2win-32.dll" (Txt As String) As Integer
  698. Declare Function cIsUpper Lib "t2win-32.dll" (Txt As String) As Integer
  699. Declare Function cIsXdigit Lib "t2win-32.dll" (Txt As String) As Integer
  700.  
  701. ' encrypt/decrypt
  702.  
  703. '  definition for encrypt/decrypt
  704. Public Const ENCRYPT_LEVEL_0 = 0
  705. Public Const ENCRYPT_LEVEL_1 = 1
  706. Public Const ENCRYPT_LEVEL_2 = 2
  707. Public Const ENCRYPT_LEVEL_3 = 3
  708. Public Const ENCRYPT_LEVEL_4 = 4
  709.  
  710. Declare Function cDecrypt Lib "t2win-32.dll" (Txt As String, Password As String, ByVal level As Integer) As String
  711. Declare Function cEncrypt Lib "t2win-32.dll" (Txt As String, Password As String, ByVal level As Integer) As String
  712. Declare Function cFileDecrypt Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, Password As String, ByVal level As Integer) As Long
  713. Declare Function cFileEncrypt Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, Password As String, ByVal level As Integer) As Long
  714.  
  715. ' hicrypt
  716.  
  717. Declare Function cCrypt Lib "t2win-32.dll" (Txt As String, ByVal Password As String) As String
  718. Declare Function cFileCrypt Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal Password As String) As Long
  719.  
  720. ' crc32
  721.  
  722. '  definition for crc32
  723. Public Const OPEN_MODE_BINARY = 0
  724. Public Const OPEN_MODE_TEXT = 1
  725.  
  726. Declare Function cFileCRC32 Lib "t2win-32.dll" (ByVal lpFilename As String, ByVal Mode As Integer) As Long
  727. Declare Function cStringCRC32 Lib "t2win-32.dll" (Txt As String) As Long
  728.  
  729. ' string
  730.  
  731. '  definition for error type for PATTERNMATCHEXT
  732. Public Const MATCH_HEXA = 17
  733. Public Const MATCH_INTERNAL_ERROR = 16
  734. Public Const MATCH_PATTERN = 15
  735. Public Const MATCH_LITERAL = 14
  736. Public Const MATCH_RANGE = 13
  737. Public Const MATCH_ABORT = 12
  738. Public Const MATCH_END = 11
  739. Public Const MATCH_VALID = -1
  740.  
  741. Public Const PATTERN_VALID = 0
  742. Public Const PATTERN_INVALID = 1
  743. Public Const PATTERN_ESC = 2
  744. Public Const PATTERN_RANGE = 3
  745. Public Const PATTERN_CLOSE = 4
  746. Public Const PATTERN_EMPTY = 5
  747. Public Const PATTERN_INTERNAL_ERROR = 6
  748. Public Const PATTERN_HEXA = 7
  749.  
  750. ' definition for PROPERNAME2
  751. Public Const PN_UPPERCASE = 1
  752. Public Const PN_PUNCTUATION = 2
  753. Public Const PN_KEEP_ORIGINAL = 4
  754. Public Const PN_ONLY_LEADER_SPACE = 8
  755.  
  756. Declare Function cAddDigit Lib "t2win-32.dll" (Txt As String) As Integer
  757. Declare Function cAlign Lib "t2win-32.dll" (Txt As String, ByVal TypeAlign As Integer, ByVal NewLength As Long) As String
  758. Declare Function cAndToken Lib "t2win-32.dll" (ByVal Txt As String, ByVal Token As String) As Integer
  759. Declare Function cAndTokenIn Lib "t2win-32.dll" (ByVal Txt As String, ByVal Token As String, ByVal Separator As String) As Integer
  760. Declare Function cArabicToRoman Lib "t2win-32.dll" (Var As Variant) As String
  761. Declare Function cBlockCharFromLeft Lib "t2win-32.dll" (Txt As String, ByVal Position As Long) As String
  762. Declare Function cBlockCharFromRight Lib "t2win-32.dll" (Txt As String, ByVal Position As Long) As String
  763. Declare Sub cChangeChars Lib "t2win-32.dll" (Txt As String, CharSet As String, NewCharSet As String)
  764. Declare Sub cChangeCharsUntil Lib "t2win-32.dll" (Txt As String, CharSet As String, NewCharSet As String, nUntil As String)
  765. Declare Function cCheckChars Lib "t2win-32.dll" (Txt As String, CharSet As String) As Integer
  766. Declare Function cCheckNumericity Lib "t2win-32.dll" (Txt As String) As Integer
  767. Declare Sub cCnvASCIItoEBCDIC Lib "t2win-32.dll" (Txt As String)
  768. Declare Sub cCnvEBCDICtoASCII Lib "t2win-32.dll" (Txt As String)
  769. Declare Function cCompact Lib "t2win-32.dll" (Txt As String) As String
  770. Declare Function cCompress Lib "t2win-32.dll" (Txt As String) As String
  771. Declare Function cCompressTab Lib "t2win-32.dll" (Txt As String, ByVal nTab As Long) As String
  772. Declare Function cCount Lib "t2win-32.dll" (Txt As String, Separator As String) As Integer
  773. Declare Function cCplAlpha Lib "t2win-32.dll" (Txt As String) As String
  774. Declare Function cCplDigit Lib "t2win-32.dll" (Txt As String) As String
  775. Declare Function cCreateAndFill Lib "t2win-32.dll" (ByVal Length As Long, Txt As String) As String
  776. Declare Function cExpandTab Lib "t2win-32.dll" (Txt As String, ByVal nTab As Long) As String
  777. Declare Sub cFill Lib "t2win-32.dll" (Txt As String, Fill As String)
  778. Declare Function cFilterBlocks Lib "t2win-32.dll" (Txt As String, Delimitor As String) As String
  779. Declare Function cFilterChars Lib "t2win-32.dll" (Txt As String, CharSet As String) As String
  780. Declare Function cFilterFirstChars Lib "t2win-32.dll" (Txt As String, CharSet As String) As String
  781. Declare Function cFilterNotChars Lib "t2win-32.dll" (Txt As String, CharSet As String) As String
  782. Declare Function cFromHexa Lib "t2win-32.dll" (Text As String) As String
  783. Declare Function cFromZ9 Lib "t2win-32.dll" (Text As String) As String
  784. Declare Function cGet Lib "t2win-32.dll" (Txt As String, ByVal Position As Long) As String
  785. Declare Function cGetBlock Lib "t2win-32.dll" (Txt As String, ByVal Position As Long, ByVal Length As Long) As String
  786. Declare Function cGetIn Lib "t2win-32.dll" (Txt As String, Separator As String, ByVal Position As Long) As String
  787. Declare Function cGetInPart Lib "t2win-32.dll" (Txt As String, Separator As String, ByVal Position As Long) As String
  788. Declare Function cGetInPartR Lib "t2win-32.dll" (Txt As String, Separator As String, ByVal Position As Long) As String
  789. Declare Function cGetInR Lib "t2win-32.dll" (Txt As String, Separator As String, ByVal Position As Long) As String
  790. Declare Function cH2I Lib "t2win-32.dll" (ByVal Txt As String) As Integer
  791. Declare Function cH2L Lib "t2win-32.dll" (ByVal Txt As String) As Long
  792. Declare Function cInsertBlocks Lib "t2win-32.dll" (Txt As String, Insert As String) As String
  793. Declare Function cInsertBlocksBy Lib "t2win-32.dll" (Txt As String, Insert As String, Delimitor As String) As String
  794. Declare Function cInsertByMask Lib "t2win-32.dll" (Txt As String, Mask As String, Insert As String) As String
  795. Declare Function cInsertChars Lib "t2win-32.dll" (Txt As String, ByVal Position As Long, Insert As String) As String
  796. Declare Function cLrc Lib "t2win-32.dll" (Txt As String) As String
  797. Declare Function cMixChars Lib "t2win-32.dll" (Txt As String) As String
  798. Declare Function cMorse Lib "t2win-32.dll" (ByVal morse As String) As String
  799. Declare Function cNumDigit Lib "t2win-32.dll" (Txt As String) As Integer
  800. Declare Function cOneCharFromLeft Lib "t2win-32.dll" (Txt As String, ByVal Position As Long) As String
  801. Declare Function cOneCharFromRight Lib "t2win-32.dll" (Txt As String, ByVal Position As Long) As String
  802. Declare Function cOrToken Lib "t2win-32.dll" (ByVal Txt As String, ByVal Token As String) As Integer
  803. Declare Function cOrTokenIn Lib "t2win-32.dll" (ByVal Txt As String, ByVal Token As String, ByVal Separator As String) As Integer
  804. Declare Function cPatternMatch Lib "t2win-32.dll" (ByVal Txt As String, ByVal pattern As String) As Integer
  805. Declare Function cPatternExtMatch Lib "t2win-32.dll" (ByVal Txt As String, ByVal pattern As String) As Integer
  806. Declare Function cProperName Lib "t2win-32.dll" (Txt As String) As String
  807. Declare Function cProperName2 Lib "t2win-32.dll" (Txt As String, ByVal TokenToUse As String, ByVal Options As Integer) As String
  808. Declare Function cRemoveBlockChar Lib "t2win-32.dll" (Txt As String, ByVal Position As Long, ByVal Length As Long) As String
  809. Declare Function cRemoveOneChar Lib "t2win-32.dll" (Txt As String, ByVal Position As Long) As String
  810. Declare Function cResizeString Lib "t2win-32.dll" (Txt As String, ByVal NewLength As Long) As String
  811. Declare Function cResizeStringAndFill Lib "t2win-32.dll" (Txt As String, ByVal NewLength As Long, Fill As String) As String
  812. Declare Function cReverse Lib "t2win-32.dll" (Txt As String) As String
  813. Declare Function cReverseSortStr Lib "t2win-32.dll" (Txt As String, ByVal nItem As Integer, ByVal ItemLength As Integer) As Integer
  814. Declare Function cRomanToArabic Lib "t2win-32.dll" (Txt As String) As Variant
  815. Declare Function cScrollL Lib "t2win-32.dll" (Txt As String) As String
  816. Declare Function cScrollR Lib "t2win-32.dll" (Txt As String) As String
  817. Declare Sub cSetDefaultSeparator Lib "t2win-32.dll" (Separator As String)
  818. Declare Function cSortStr Lib "t2win-32.dll" (Txt As String, ByVal nItem As Integer, ByVal ItemLength As Integer) As Integer
  819. Declare Function cStringSAR Lib "t2win-32.dll" (ByVal Txt As String, ByVal Search As String, ByVal Replace As String, ByVal Sensitivity As Integer) As String
  820. Declare Function cToHexa Lib "t2win-32.dll" (Text As String) As String
  821. Declare Function cTokenIn Lib "t2win-32.dll" (Txt As String, Separator As String, ByVal Position As Integer) As String
  822. Declare Function cToZ9 Lib "t2win-32.dll" (Text As String) As String
  823. Declare Function cUncompact Lib "t2win-32.dll" (Txt As String) As String
  824.  
  825. ' random
  826.  
  827. Declare Sub cRndInit Lib "t2win-32.dll" (ByVal nRnd As Long)
  828. Declare Function cRnd Lib "t2win-32.dll" () As Double
  829. Declare Function cRndD Lib "t2win-32.dll" () As Double
  830. Declare Function cRndI Lib "t2win-32.dll" () As Integer
  831. Declare Function cRndL Lib "t2win-32.dll" () As Long
  832. Declare Function cRndS Lib "t2win-32.dll" () As Single
  833.  
  834. ' swap
  835.  
  836. Declare Sub cSwapB Lib "t2win-32.dll" (swap1 As Byte, swap2 As Byte)
  837. Declare Sub cSwapD Lib "t2win-32.dll" (swap1 As Double, swap2 As Double)
  838. Declare Sub cSwapI Lib "t2win-32.dll" (swap1 As Integer, swap2 As Integer)
  839. Declare Sub cSwapL Lib "t2win-32.dll" (swap1 As Long, swap2 As Long)
  840. Declare Sub cSwapS Lib "t2win-32.dll" (swap1 As Single, swap2 As Single)
  841. Declare Sub cSwapStr Lib "t2win-32.dll" (swap1 As String, swap2 As String)
  842.  
  843. ' type
  844.  
  845. Declare Function cCompareTypeString Lib "t2win-32.dll" Alias "cTypesCompare" (TypeSrc As Any, ByVal Dst As String, ByVal lenTypeSrc As Integer) As Integer
  846. Declare Function cCompareStringType Lib "t2win-32.dll" Alias "cTypesCompare" (ByVal Src As String, TypeDst As Any, ByVal lenTypeSrc As Integer) As Integer
  847. Declare Sub cStringToType Lib "t2win-32.dll" Alias "cTypesCopy" (ByVal Src As String, TypeDst As Any, ByVal lenTypeSrc As Integer)
  848. Declare Sub cTypeClear Lib "t2win-32.dll" (TypeSrc As Any, ByVal lenTypeSrc As Integer)
  849. Declare Function cTypeMid Lib "t2win-32.dll" (TypeSrc As Any, ByVal offset As Integer, ByVal Length As Integer) As String
  850. Declare Function cTypesCompare Lib "t2win-32.dll" (Type1 As Any, Type2 As Any, ByVal lenType1 As Integer) As Integer
  851. Declare Sub cTypesCopy Lib "t2win-32.dll" (TypeSrc As Any, TypeDst As Any, ByVal lenTypeSrc As Integer)
  852. Declare Function cTypeTransfert Lib "t2win-32.dll" (TypeSrc As Any, ByVal lenTypeSrc As Integer) As String
  853. Declare Sub cTypeToString Lib "t2win-32.dll" Alias "cTypesCopy" (TypeSrc As Any, ByVal Dst As String, ByVal lenTypeSrc As Integer)
  854.  
  855. ' miscelleanous
  856.  
  857. Declare Function cMax Lib "t2win-32.dll" (Var1 As Variant, Var2 As Variant) As Variant
  858. Declare Function cMin Lib "t2win-32.dll" (Var1 As Variant, Var2 As Variant) As Variant
  859. Declare Sub cIncrI Lib "t2win-32.dll" (Value As Integer)
  860. Declare Sub cIncrL Lib "t2win-32.dll" (Value As Long)
  861. Declare Sub cDecrI Lib "t2win-32.dll" (Value As Integer)
  862. Declare Sub cDecrL Lib "t2win-32.dll" (Value As Long)
  863. Declare Function cSpellMoney Lib "t2win-32.dll" (ByVal Value As Double, ByVal Units As String, ByVal Cents As String) As String
  864. Declare Function cFraction Lib "t2win-32.dll" (ByVal nValue As Double, nNumerator As Double, nDenominator As Double) As Double
  865. Declare Function cCombination Lib "t2win-32.dll" (ByVal nItems As Integer, ByVal mTimes As Integer) As Double
  866. Declare Function cSgn Lib "t2win-32.dll" (ByVal Value As Integer) As Integer
  867. Declare Function cBetween Lib "t2win-32.dll" (Var As Variant, Var1 As Variant, Var2 As Variant) As Integer
  868. Declare Function cGetPid Lib "t2win-32.dll" () As Integer
  869. Declare Function cBaseConversion Lib "t2win-32.dll" (ByVal Num As String, ByVal RadixIn As Integer, ByVal RadixOut As Integer) As String
  870.  
  871. ' windows
  872.  
  873. '  definition for win.ini section
  874. Public Const GET_TIME_SEPARATOR = 1
  875. Public Const GET_DATE_SEPARATOR = 2
  876. Public Const GET_TIME_FORMAT = 3
  877. Public Const GET_DATE_FORMAT = 4
  878. Public Const GET_CURRENCY = 5
  879. Public Const GET_LANGUAGE = 6
  880. Public Const GET_COUNTRY = 7
  881. Public Const GET_COUNTRY_CODE = 8
  882. Public Const GET_LIST_SEPARATOR = 9
  883. Public Const GET_DEFAULT_PRINTER = 10
  884.  
  885. Declare Sub cArrangeDesktopIcons Lib "t2win-32.dll" ()
  886. Declare Sub cCenterWindow Lib "t2win-32.dll" (ByVal hWnd As Long)
  887. Declare Function cEXEnameActiveWindow Lib "t2win-32.dll" () As String
  888. Declare Function cEXEnameWindow Lib "t2win-32.dll" (ByVal hWnd As Long) As String
  889. Declare Function cEXEnameTask Lib "t2win-32.dll" (ByVal nFilename As String) As String
  890. Declare Function cExitWindowsAndExecute Lib "t2win-32.dll" (ByVal lpszExe As String, ByVal lpszParams As String) As Integer
  891. Declare Function cFindFileInEnv Lib "t2win-32.dll" (ByVal lpFilename As String, ByVal lpEnv As String) As Integer
  892. Declare Function cFindFileInPath Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  893. Declare Function cGetClassName Lib "t2win-32.dll" (ByVal hWnd As Long) As String
  894. Declare Function cGetCountry Lib "t2win-32.dll" () As String
  895. Declare Function cGetCountryCode Lib "t2win-32.dll" () As String
  896. Declare Function cGetCurrency Lib "t2win-32.dll" () As String
  897. Declare Function cGetCurrentDrive Lib "t2win-32.dll" () As String
  898. Declare Function cGetDateFormat Lib "t2win-32.dll" () As String
  899. Declare Function cGetDateSeparator Lib "t2win-32.dll" () As String
  900. Declare Function cGetDefaultCurrentDir Lib "t2win-32.dll" () As String
  901. Declare Function cGetDefaultPrinter Lib "t2win-32.dll" () As String
  902. Declare Function cGetDevices Lib "t2win-32.dll" () As String
  903. Declare Function cGetDriveCurrentDir Lib "t2win-32.dll" (ByVal lpDrive As String) As String
  904. Declare Function cGetFullNameInEnv Lib "t2win-32.dll" (ByVal lpFilename As String, ByVal lpEnv As String) As String
  905. Declare Function cGetFullNameInPath Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  906. Declare Function cGetHourFormat Lib "t2win-32.dll" () As String
  907. Declare Function cGetIni Lib "t2win-32.dll" (ByVal AppName As String, ByVal szItem As String, ByVal szDefault As String, ByVal InitFile As String) As String
  908. Declare Function cGetLanguage Lib "t2win-32.dll" () As String
  909. Declare Function cGetListSeparator Lib "t2win-32.dll" () As String
  910. Declare Function cGetSystemDirectory Lib "t2win-32.dll" () As String
  911. Declare Function cGetTimeSeparator Lib "t2win-32.dll" () As String
  912. Declare Function cGetWindowsDirectory Lib "t2win-32.dll" () As String
  913. Declare Function cGetWinINI Lib "t2win-32.dll" (ByVal Info As Integer) As String
  914. Declare Function cGetWinSection Lib "t2win-32.dll" (ByVal Section As String) As String
  915. Declare Sub cPutIni Lib "t2win-32.dll" (ByVal AppName As String, ByVal szItem As String, ByVal szDefault As String, ByVal InitFile As String)
  916. Declare Function cRebootSystem Lib "t2win-32.dll" () As Integer
  917. Declare Function cRestartWindows Lib "t2win-32.dll" () As Integer
  918. Declare Function cSetHandleCount Lib "t2win-32.dll" (ByVal nHandle As Integer) As Integer
  919. Declare Sub cShowWindow Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal Method As Integer, ByVal interval As Integer)
  920. Declare Function cGetSectionItems Lib "t2win-32.dll" (ByVal Section As String, ByVal InitFile As String, nItems As Integer) As String
  921. Declare Function cTaskBarAddIcon Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal hIcon As Long, ByVal lpszTip As String) As Integer
  922. Declare Function cTaskBarDeleteIcon Lib "t2win-32.dll" (ByVal hWnd As Long) As Integer
  923. Declare Function cTaskBarModifyIcon Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal hIcon As Long, ByVal lpszTip As String) As Integer
  924.  
  925. ' list/combo box
  926.  
  927. Public Const DDL_READWRITE = &H0
  928. Public Const DDL_READONLY = &H1
  929. Public Const DDL_HIDDEN = &H2
  930. Public Const DDL_SYSTEM = &H4
  931. Public Const DDL_DIRECTORY = &H10
  932. Public Const DDL_ARCHIVE = &H20
  933. Public Const DDL_POSTMSGS = &H2000
  934. Public Const DDL_DRIVES = &H4000
  935. Public Const DDL_EXCLUSIVE = &H8000
  936.  
  937. Declare Function cArrayToComboBox Lib "t2win-32.dll" (ByVal hWnd As Long, array() As String) As Integer
  938. Declare Function cArrayToListBox Lib "t2win-32.dll" (ByVal hWnd As Long, array() As String) As Integer
  939. Declare Function cFileToComboBox Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal nFile As String) As Integer
  940. Declare Function cFileToListBox Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal nFile As String) As Integer
  941. Declare Function cListSetTabs Lib "t2win-32.dll" (ByVal hWnd As Long, TabArray() As Long) As Integer
  942. Declare Function cListFiles Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal Attributes As Long, ByVal FilePathMaask As String) As Integer
  943. Declare Function cComboFiles Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal Attributes As Long, ByVal FilePathMaask As String) As Integer
  944. Declare Function cListSearchFile Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal StartPath As String, ByVal FileMask As String) As Long
  945. Declare Function cComboSearchFile Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal StartPath As String, ByVal FileMask As String) As Long
  946.  
  947. ' mdtkfv
  948.  
  949. '  definition for sFile version information
  950. Public Const VER_VERSION_PRODUCT = -1
  951. Public Const VER_VERSION_FILE = 0
  952. Public Const VER_COMPANY_NAME = 1
  953. Public Const VER_FILE_DESCRIPTION = 2
  954. Public Const VER_FILE_VERSION = 3
  955. Public Const VER_INTERNAL_NAME = 4
  956. Public Const VER_LEGAL_COPYRIGHT = 5
  957. Public Const VER_LEGAL_TRADEMARKS = 6
  958. Public Const VER_PRODUCT_NAME = 7
  959. Public Const VER_PRODUCT_VERSION = 8
  960.  
  961. '  structure for sFile version information
  962. Type tagFILEVERSIONINFO
  963.    VersionProduct    As String
  964.    VersionFile       As String
  965.    CompanyName       As String
  966.    FileDescription   As String
  967.    FileVersion       As String
  968.    InternalName      As String
  969.    LegalCopyright    As String
  970.    LegalTrademarks   As String
  971.    Comments          As String
  972.    ProductName       As String
  973.    ProductVersion    As String
  974. End Type
  975.  
  976. ' structure for modules
  977. Type tagMODULEENTRY
  978.    dwSize               As Long
  979.    th32ModuleID         As Long
  980.    th32ProcessID        As Long
  981.    GlblcntUsage         As Long
  982.    ProccntUsage         As Long
  983.    modBaseAddr          As Byte
  984.    modBaseSize          As Long
  985.    hModule              As Long
  986.    szModule             As String * 256
  987.    szExePath            As String * 260
  988. End Type
  989.  
  990. Type tagPROCESSENTRY
  991.    dwSize               As Long
  992.    cntUsage             As Long
  993.    th32ProcessID        As Long
  994.    th32DefaultHeapID    As Long
  995.    th32ModuleID         As Long
  996.    cntThreads           As Long
  997.    th32ParentProcessID  As Long
  998.    pcPriClassBase       As Long
  999.    dwFlags              As Long
  1000.    szExeFile            As String * 260
  1001. End Type
  1002.  
  1003. Type tagTHREADENTRY
  1004.    dwSize               As Long
  1005.    cntUsage             As Long
  1006.    th32ThreadID         As Long
  1007.    th32OwnerProcessID   As Long
  1008.    tpBasePri            As Long
  1009.    tpDeltaPri           As Long
  1010.    dwFlags              As Long
  1011. End Type
  1012.  
  1013. Declare Sub cChangeTaskName Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal Text As String)
  1014. Declare Function cGetFileVersion Lib "t2win-32.dll" (ByVal FileName As String, ByVal nFonction As Integer) As String
  1015. Declare Function cGetFileVersionInfo Lib "t2win-32.dll" (ByVal FileName As String, FILEVERSIONINFO As Any) As Integer
  1016. Declare Function cGetChangeTaskName Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal Text As String) As String
  1017. Declare Function cGetTaskName Lib "t2win-32.dll" (ByVal hWnd As Long) As String
  1018. Declare Function cModule Lib "t2win-32.dll" (MODULEENTRY As tagMODULEENTRY, ByVal FirstNext As Integer) As Integer
  1019. Declare Function cProcess Lib "t2win-32.dll" (PROCESSENTRY As tagPROCESSENTRY, ByVal FirstNext As Integer) As Integer
  1020. Declare Function cThread Lib "t2win-32.dll" (THREADENTRY As tagTHREADENTRY, ByVal FirstNext As Integer) As Integer
  1021. Declare Function cWalkThruWindow Lib "t2win-32.dll" (Class As String, Caption As String, OwnerHwnd As Long, OwnerClass As String, OwnerCaption As String, ByVal FirstNext As Integer) As Long
  1022.  
  1023. ' date - time
  1024.  
  1025. Declare Function cIntoDate Lib "t2win-32.dll" (ByVal nDate As Long) As String
  1026. Declare Function cIntoDateFill Lib "t2win-32.dll" (ByVal nDate As Long) As String
  1027. Declare Function cIntoDateNull Lib "t2win-32.dll" (ByVal nDate As Long) As String
  1028. Declare Function cIntoFixHour Lib "t2win-32.dll" (Var As Variant, ByVal Length As Integer, ByVal fillZero As Integer, ByVal CentiΦme As Integer) As String
  1029. Declare Function cIntoHour Lib "t2win-32.dll" (Var As Variant) As String
  1030. Declare Function cIntoVarHour Lib "t2win-32.dll" (Var As Variant) As String
  1031. Declare Function cDayOfWeek Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer, ByVal nISO As Integer) As Integer
  1032. Declare Function cDayOfYear Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer) As Integer
  1033. Declare Function cDaysInMonth Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer) As Integer
  1034. Declare Function cDateToScalar Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer) As Long
  1035. Declare Sub cScalarToDate Lib "t2win-32.dll" (ByVal Scalar As Long, nYear As Integer, nMonth As Integer, nDay As Integer)
  1036. Declare Sub cScalarToTime Lib "t2win-32.dll" (ByVal Scalar As Long, nHour As Integer, nMin As Integer, nSec As Integer)
  1037. Declare Function cTimeBetween Lib "t2win-32.dll" (ByVal Hr1 As Integer, ByVal Hr2 As Integer) As Integer
  1038. Declare Function cTimeToScalar Lib "t2win-32.dll" (ByVal nHour As Integer, ByVal nMin As Integer, ByVal nSec As Integer) As Long
  1039. Declare Function cWeekOfYear Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer, ByVal nISO As Integer) As Integer
  1040. Declare Function cCurrentTime Lib "t2win-32.dll" () As Integer
  1041. Declare Function cAddTime Lib "t2win-32.dll" (ByVal Hr As Integer) As Integer
  1042. Declare Function cAddTwoTimes Lib "t2win-32.dll" (ByVal Time1 As String, ByVal Time2 As String) As String
  1043. Declare Function cCheckTime Lib "t2win-32.dll" (ByVal Hr As Integer, ByVal Hr1 As Integer, ByVal Hr2 As Integer) As Integer
  1044. Declare Function cTrueBetween Lib "t2win-32.dll" (Var As Variant, Var1 As Variant, Var2 As Variant) As Integer
  1045. Declare Function cHourTo Lib "t2win-32.dll" (Txt As String) As Variant
  1046. Declare Function cIntoBalance Lib "t2win-32.dll" (Var As Variant) As String
  1047. Declare Function cIntoBalanceFill Lib "t2win-32.dll" (Var As Variant) As String
  1048.  
  1049. ' process id
  1050.  
  1051. Declare Sub cPushID Lib "t2win-32.dll" (IDArray() As Integer, ByVal nID As Integer)
  1052. Declare Sub cPopID Lib "t2win-32.dll" (IDArray() As Integer, ByVal nID As Integer)
  1053. Declare Sub cPopLastID Lib "t2win-32.dll" (IDArray() As Integer)
  1054. Declare Function cGetID Lib "t2win-32.dll" (IDArray() As Integer, ByVal nPosition As Integer) As Integer
  1055. Declare Sub cClearID Lib "t2win-32.dll" (IDArray() As Integer)
  1056.  
  1057. ' sFile I/O, direct routines issued from C functionnalities
  1058.  
  1059. Declare Function cFopen Lib "t2win-32.dll" (ByVal sFile As String, ByVal Mode As String) As Long
  1060. Declare Function cFclose Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1061. Declare Function cFgetc Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1062. Declare Function cFputc Lib "t2win-32.dll" (ByVal char As Integer, ByVal IOstream As Long) As Integer
  1063. Declare Function cFputs Lib "t2win-32.dll" (ByVal Txt As String, ByVal IOstream As Long) As Integer
  1064. Declare Function cFgets Lib "t2win-32.dll" (Txt As String, ByVal Length As Integer, ByVal IOstream As Long) As Integer
  1065. Declare Function cFwrite Lib "t2win-32.dll" (Txt As String, ByVal IOstream As Long) As Integer
  1066. Declare Function cFread Lib "t2win-32.dll" (Txt As String, ByVal Length As Integer, ByVal IOstream As Long) As Integer
  1067. Declare Function cFcloseall Lib "t2win-32.dll" () As Integer
  1068. Declare Function cFflush Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1069. Declare Function cFflushall Lib "t2win-32.dll" () As Integer
  1070. Declare Function cFeof Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1071. Declare Function cFerror Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1072. Declare Sub cFclearerr Lib "t2win-32.dll" (ByVal IOstream As Long)
  1073. Declare Function cFseek Lib "t2win-32.dll" (ByVal IOstream As Long, ByVal offset As Long, ByVal origin As Integer) As Integer
  1074. Declare Function cFtell Lib "t2win-32.dll" (ByVal IOstream As Long) As Long
  1075. Declare Sub cFrewind Lib "t2win-32.dll" (ByVal IOstream As Long)
  1076. Declare Function cFProcessAsciiFile Lib "t2win-32.dll" (ByVal IOstream As Long, AsciiOffset() As Long) As Long
  1077. Declare Function cFGotoRecord Lib "t2win-32.dll" (ByVal IOstream As Long, AsciiOffset() As Long, ByVal Record As Long) As Integer
  1078.  
  1079. ' day - month
  1080.  
  1081. '  definition for language in multi-language management
  1082. Public Const LNG_FRENCH = 1
  1083. Public Const LNG_DUTCH = 2
  1084. Public Const LNG_GERMAN = 3
  1085. Public Const LNG_ENGLISH = 4
  1086. Public Const LNG_ITALIAN = 5
  1087. Public Const LNG_SPANISH = 6
  1088. Public Const LNG_CATALAN = 7
  1089. Public Const LNG_POLISH = 8
  1090. Public Const LNG_NORWAY = 9
  1091.  
  1092. Declare Function cGetAscTime Lib "t2win-32.dll" (ByVal nLanguage As Integer) As String
  1093. Declare Function cGetLongDay Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nDay As Integer) As String
  1094. Declare Function cGetLongMonth Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nMonth As Integer) As String
  1095. Declare Function cGetShortDay Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nDay As Integer) As String
  1096. Declare Function cGetShortMonth Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nMonth As Integer) As String
  1097. Declare Function cGetSmallDay Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nDay As Integer) As String
  1098. Declare Function cGetTinyDay Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nDay As Integer) As String
  1099. Declare Function cGetTinyMonth Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nMonth As Integer) As String
  1100. Declare Sub cSysMenuChange Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal Position As Integer, ByVal NewMessage As String)
  1101.  
  1102. ' Functions for calculating 2-D geometry
  1103.  
  1104. '  structure for 2-D geometry types
  1105. Type tagVECTOR2
  1106.    x              As Double
  1107.    y              As Double
  1108. End Type
  1109.  
  1110. Declare Sub cV2Add Lib "t2win-32.dll" (u As tagVECTOR2, v As tagVECTOR2, w As tagVECTOR2)
  1111. Declare Sub cV2Sub Lib "t2win-32.dll" (u As tagVECTOR2, v As tagVECTOR2, w As tagVECTOR2)
  1112. Declare Sub cV2Combine Lib "t2win-32.dll" (u As tagVECTOR2, ByVal c1 As Double, v As tagVECTOR2, ByVal c2 As Double, w As tagVECTOR2)
  1113. Declare Sub cV2Copy Lib "t2win-32.dll" (u As tagVECTOR2, w As tagVECTOR2)
  1114. Declare Function cV2Dot Lib "t2win-32.dll" (u As tagVECTOR2, v As tagVECTOR2) As Double
  1115. Declare Function cV2Length Lib "t2win-32.dll" (u As tagVECTOR2) As Double
  1116. Declare Function cV2LengthSquared Lib "t2win-32.dll" (u As tagVECTOR2) As Double
  1117. Declare Sub cV2LinearIp Lib "t2win-32.dll" (lo As tagVECTOR2, hi As tagVECTOR2, ByVal alpha As Double, w As tagVECTOR2)
  1118. Declare Sub cV2Mul Lib "t2win-32.dll" (u As tagVECTOR2, v As tagVECTOR2, w As tagVECTOR2)
  1119. Declare Sub cV2Neg Lib "t2win-32.dll" (u As tagVECTOR2)
  1120. Declare Sub cV2Normalized Lib "t2win-32.dll" (u As tagVECTOR2)
  1121. Declare Sub cV2Ortho Lib "t2win-32.dll" (u As tagVECTOR2, w As tagVECTOR2)
  1122. Declare Sub cV2ScaledNewLength Lib "t2win-32.dll" (u As tagVECTOR2, ByVal newlen As Double)
  1123. Declare Function cV2SegmentLength Lib "t2win-32.dll" (p As tagVECTOR2, q As tagVECTOR2) As Double
  1124.  
  1125. ' Functions for calculating 3-D geometry
  1126.  
  1127. '  structure for 3-D geometry types
  1128. Type tagVECTOR3
  1129.    x              As Double
  1130.    y              As Double
  1131.    z              As Double
  1132. End Type
  1133.  
  1134. Declare Sub cV3Add Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3, w As tagVECTOR3)
  1135. Declare Sub cV3Sub Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3, w As tagVECTOR3)
  1136. Declare Sub cV3Combine Lib "t2win-32.dll" (u As tagVECTOR3, ByVal c1 As Double, v As tagVECTOR3, ByVal c2 As Double, w As tagVECTOR3)
  1137. Declare Sub cV3Copy Lib "t2win-32.dll" (u As tagVECTOR3, w As tagVECTOR3)
  1138. Declare Sub cV3Cross Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3, w As tagVECTOR3)
  1139. Declare Function cV3Dot Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3) As Double
  1140. Declare Function cV3Length Lib "t2win-32.dll" (u As tagVECTOR3) As Double
  1141. Declare Function cV3LengthSquared Lib "t2win-32.dll" (u As tagVECTOR3) As Double
  1142. Declare Sub cV3LinearIp Lib "t2win-32.dll" (lo As tagVECTOR3, hi As tagVECTOR3, ByVal alpha As Double, w As tagVECTOR3)
  1143. Declare Sub cV3Mul Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3, w As tagVECTOR3)
  1144. Declare Sub cV3Neg Lib "t2win-32.dll" (u As tagVECTOR3)
  1145. Declare Sub cV3Normalized Lib "t2win-32.dll" (u As tagVECTOR3)
  1146. Declare Sub cV3ScaledNewLength Lib "t2win-32.dll" (u As tagVECTOR3, ByVal newlen As Double)
  1147. Declare Function cV3SegmentLength Lib "t2win-32.dll" (p As tagVECTOR3, q As tagVECTOR3) As Double
  1148.  
  1149. Declare Function c3DWeightAverage Lib "t2win-32.dll" (ul3D As tagVECTOR3, ll3D As tagVECTOR3, lr3D As tagVECTOR3, ur3D As tagVECTOR3, ptToLocate3D As tagVECTOR3) As Double
  1150.  
  1151. ' huge string
  1152.  
  1153. Declare Function cHugeStrAdd Lib "t2win-32.dll" (ByVal hsHandle As Long, hsText As String) As Integer
  1154. Declare Function cHugeStrAddress Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1155. Declare Function cHugeStrAppend Lib "t2win-32.dll" (ByVal hsHandle As Long, hsText As String) As Integer
  1156. Declare Function cHugeStrBlocks Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1157. Declare Function cHugeStrClear Lib "t2win-32.dll" (ByVal hsHandle As Long) As Integer
  1158. Declare Function cHugeStrCreate Lib "t2win-32.dll" (ByVal hsSize As Long) As Long
  1159. Declare Function cHugeStrFree Lib "t2win-32.dll" (ByVal hsHandle As Long) As Integer
  1160. Declare Function cHugeStrGetNP Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1161. Declare Function cHugeStrGetWP Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1162. Declare Function cHugeStrLength Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1163. Declare Function cHugeStrMid Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsStart As Long, ByVal hsLength As Long) As String
  1164. Declare Function cHugeStrNext Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsNext As Long) As String
  1165. Declare Function cHugeStrOnDisk Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsFile As String, ByVal hsGetPut As Integer) As Long
  1166. Declare Function cHugeStrRead Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsBlock As Long) As String
  1167. Declare Function cHugeStrSetNP Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsPtr As Long) As Integer
  1168. Declare Function cHugeStrSetWP Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsPtr As Long) As Integer
  1169. Declare Function cHugeStrSize Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1170.  
  1171. ' t2win-32 version
  1172.  
  1173. Declare Function cGetVersion Lib "t2win-32.dll" () As Single
  1174.  
  1175. ' protect
  1176.  
  1177. Declare Function cDESencrypt Lib "t2win-32.dll" (Text As String, Key As String) As String
  1178. Declare Function cDESdecrypt Lib "t2win-32.dll" (Text As String, Key As String) As String
  1179. Declare Function cDIAMONDencrypt Lib "t2win-32.dll" (Text As String, Key As String, ByVal Mode As Integer) As String
  1180. Declare Function cDIAMONDdecrypt Lib "t2win-32.dll" (Text As String, Key As String, ByVal Mode As Integer) As String
  1181. Declare Function cHashMD5 Lib "t2win-32.dll" (Text As String) As String
  1182. Declare Function cIDEAencrypt Lib "t2win-32.dll" (Text As String, Key As String) As String
  1183. Declare Function cIDEAdecrypt Lib "t2win-32.dll" (Text As String, Key As String) As String
  1184. Declare Function cMod10 Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1185. Declare Function cMod10R Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1186. Declare Function cMod11 Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1187. Declare Function cMod11R Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1188. Declare Function cMod137 Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1189. Declare Function cMod137R Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1190. Declare Function cRegistrationKey Lib "t2win-32.dll" (ByVal RegText As String, ByVal RegKey1 As Long) As Long
  1191. Declare Function cRegistrationKey2 Lib "t2win-32.dll" (ByVal RegText As String, ByVal RegKey1 As Long, ByVal RegKey2 As Long) As Long
  1192. Declare Function cRegistrationKey3 Lib "t2win-32.dll" (ByVal RegText As String, ByVal RegKey1 As Long, ByVal RegKey2 As Long, ByVal RegKey3 As Long) As Long
  1193. Declare Function cRUBYencrypt Lib "t2win-32.dll" (Text As String, Key As String, ByVal Mode As Integer) As String
  1194. Declare Function cRUBYdecrypt Lib "t2win-32.dll" (Text As String, Key As String, ByVal Mode As Integer) As String
  1195.  
  1196. ' file protect
  1197.  
  1198. Public Const CRYPTO_KEY_TOO_SMALL = -1
  1199. Public Const CRYPTO_CANT_INIT_KEY = -2
  1200. Public Const CRYPTO_CANT_INIT_BUFFER = -11
  1201. Public Const CRYPTO_CANT_OPEN_FILEIN = -21
  1202. Public Const CRYPTO_CANT_CREATE_FILEOUT = -22
  1203. Public Const CRYPTO_ERROR_READING_FILEIN = -31
  1204. Public Const CRYPTO_ERROR1_WRITING_FILEOUT = -41
  1205. Public Const CRYPTO_ERROR2_WRITING_FILEOUT = -42
  1206. Public Const CRYPTO_ERROR1_WRITING_LASTBYTE = -51
  1207. Public Const CRYPTO_ERROR2_WRITING_LASTBYTE = -52
  1208. Public Const CRYPTO_BAD_LASTBYTE = -61
  1209.  
  1210. Public Const DIAMOND_FULL_MODE1 = 1          ' more strongest (slowest)
  1211. Public Const DIAMOND_FULL_MODE2 = 3          ' more strong (slow)
  1212. Public Const DIAMOND_LITE_MODE1 = 2          ' strongest (fast)
  1213. Public Const DIAMOND_LITE_MODE2 = 4          ' strong (fastest)
  1214.  
  1215. Public Const RUBY_MODE_MINIMUM = 1           ' speed is of the essence, security secondary.
  1216. Public Const RUBY_MODE_DESK_LOCK = 2         ' reasonable compromise of speed vs security.
  1217. Public Const RUBY_MODE_DEAD_BOLT = 4         ' default = probably good enough for most things.
  1218. Public Const RUBY_MODE_PORTABLE_SAFE = 5     ' security is more important than speed.
  1219. Public Const RUBY_MODE_ANCHORED_SAFE = 8     ' speed isn't much of a concern.
  1220. Public Const RUBY_MODE_BANK_VAULT = 10       ' your pentium has nothing better to do, anyway.
  1221. Public Const RUBY_MODE_FORT_KNOX = 16        ' be cool.
  1222.  
  1223. Declare Function cDESdecryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String) As Long
  1224. Declare Function cDESencryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String) As Long
  1225. Declare Function cDIAMONDdecryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String, ByVal Mode As Integer) As Long
  1226. Declare Function cDIAMONDencryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String, ByVal Mode As Integer) As Long
  1227. Declare Function cIDEAdecryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String) As Long
  1228. Declare Function cIDEAencryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String) As Long
  1229. Declare Function cRUBYdecryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String, ByVal Mode As Integer) As Long
  1230. Declare Function cRUBYencryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String, ByVal Mode As Integer) As Long
  1231.  
  1232. ' media ID - volume
  1233.  
  1234. '  structure for get/set Media ID
  1235. Type tagMEDIAID
  1236.    VolumeName           As String
  1237.    VolumeSerialNumber   As Long
  1238.    SystemName           As String
  1239.    MaxNameLength        As Long
  1240.    FileSystemFlags      As Long
  1241. End Type
  1242.  
  1243. ' structure for get/set DOS Media ID
  1244. Type tagDOSMEDIAID
  1245.    InfoLevel            As String * 2     'use cCVI for integer conversion
  1246.    SerialNumber         As String * 4     'use cCVL for long conversion
  1247.    VolLabel             As String * 11
  1248.    FileSysType          As String * 8
  1249. End Type
  1250.  
  1251. Declare Function cGetMediaID Lib "t2win-32.dll" (ByVal nDrive As String, MEDIAID As tagMEDIAID) As Integer
  1252. Declare Function cGetVolumeLabel Lib "t2win-32.dll" (ByVal nDrive As String) As String
  1253. Declare Function cSetVolumeLabel Lib "t2win-32.dll" (ByVal nDrive As String, ByVal nVolumeLabel As String) As Integer
  1254. Declare Function cDOSGetMediaID Lib "t2win-32.dll" (ByVal nDrive As String, DOSMEDIAID As tagDOSMEDIAID) As Integer
  1255. Declare Function cDOSSetMediaID Lib "t2win-32.dll" (ByVal nDrive As String, DOSMEDIAID As tagDOSMEDIAID) As Integer
  1256.  
  1257. ' network
  1258.  
  1259. Declare Function cGetNetConnection Lib "t2win-32.dll" (ByVal lpDrive As String, ErrCode As Integer) As String
  1260.  
  1261. ' multi-language message box - input box
  1262.  
  1263. '  definition for message position
  1264. Public Const MB_MESSAGE_LEFT = 0
  1265. Public Const MB_MESSAGE_CENTER = 8192
  1266. Public Const MB_MESSAGE_RIGHT = 16384
  1267.  
  1268. '  definition for timeout management
  1269. Public Const MB_TIMEOUT_2 = 32768
  1270. Public Const MB_TIMEOUT_4 = 2 * MB_TIMEOUT_2
  1271. Public Const MB_TIMEOUT_8 = 2 * MB_TIMEOUT_4
  1272. Public Const MB_TIMEOUT_16 = 2 * MB_TIMEOUT_8
  1273.  
  1274. Public Const MB_TIMEOUT_6 = MB_TIMEOUT_2 Or MB_TIMEOUT_4
  1275. Public Const MB_TIMEOUT_10 = MB_TIMEOUT_2 Or MB_TIMEOUT_8
  1276. Public Const MB_TIMEOUT_12 = MB_TIMEOUT_4 Or MB_TIMEOUT_8
  1277. Public Const MB_TIMEOUT_14 = MB_TIMEOUT_2 Or MB_TIMEOUT_4 Or MB_TIMEOUT_8
  1278. Public Const MB_TIMEOUT_18 = MB_TIMEOUT_2 Or MB_TIMEOUT_16
  1279. Public Const MB_TIMEOUT_20 = MB_TIMEOUT_4 Or MB_TIMEOUT_16
  1280. Public Const MB_TIMEOUT_22 = MB_TIMEOUT_2 Or MB_TIMEOUT_4 Or MB_TIMEOUT_16
  1281. Public Const MB_TIMEOUT_24 = MB_TIMEOUT_8 Or MB_TIMEOUT_16
  1282. Public Const MB_TIMEOUT_26 = MB_TIMEOUT_2 Or MB_TIMEOUT_8 Or MB_TIMEOUT_16
  1283. Public Const MB_TIMEOUT_28 = MB_TIMEOUT_4 Or MB_TIMEOUT_8 Or MB_TIMEOUT_16
  1284. Public Const MB_TIMEOUT_30 = MB_TIMEOUT_2 Or MB_TIMEOUT_4 Or MB_TIMEOUT_8 Or MB_TIMEOUT_16
  1285.  
  1286. Public Const MB_DISPLAY_TIMEOUT = 524288
  1287. Public Const MB_NO_BUTTONS = 1048576
  1288.  
  1289. Declare Function cLngMsgBox Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal Message As String, ByVal Button As Long, ByVal Title As String) As Integer
  1290. Declare Sub cLngBoxMsg Lib "t2win-32.dll" Alias "cLngMsgBox" (ByVal nLanguage As Integer, ByVal Message As String, ByVal Button As Long, ByVal Title As String)
  1291. Declare Function cLngInpBox Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal Message As String, ByVal Title As String, ByVal Default As String) As String
  1292. Declare Sub cLngSysMenu Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal hWnd As Long)
  1293.  
  1294. ' desktop
  1295.  
  1296. Declare Sub cLoadDesktopBackground Lib "t2win-32.dll" (ByVal FileName As String, ByVal Tile As Integer)
  1297.  
  1298. ' registry
  1299.  
  1300. Public Const RK_NO_ERROR = -1
  1301. Public Const RK_KEY_IS_EMPTY = 1
  1302. Public Const RK_UNABLE_TO_CREATE_KEY = 2
  1303. Public Const RK_UNABLE_TO_OPEN_KEY = 3
  1304. Public Const RK_UNKNOWN_DISPOSITION = 4
  1305. Public Const RK_CANNOT_SET_THE_VALUE = 5
  1306. Public Const RK_UNABLE_TO_QUERY_KEY = 6
  1307.  
  1308. Declare Function cPutRegistry Lib "t2win-32.dll" (ByVal lpSection As String, ByVal lpKey As String, ByVal lpValue As String) As Integer
  1309. Declare Function cGetRegistry Lib "t2win-32.dll" (ByVal lpSection As String, ByVal lpKey As String, ByVal lpDefault As String) As String
  1310. Declare Function cKillRegistry Lib "t2win-32.dll" (ByVal lpSection As String, ByVal lpKey As String) As Integer
  1311.  
  1312. ' bitmap
  1313.  
  1314. Public Const DIB_SAVE_WINDOW = True
  1315. Public Const DIB_SAVE_CLIENT = False
  1316.  
  1317. Type tagRECT
  1318.    Left                 As Long
  1319.    Top                  As Long
  1320.    Right                As Long
  1321.    Bottom               As Long
  1322. End Type
  1323.  
  1324. Declare Function cDIBSaveScreen Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  1325. Declare Function cDIBSaveWindow Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal SaveArea As Integer, ByVal lpFilename As String) As Integer
  1326. Declare Function cShadeRect Lib "t2win-32.dll" (ByVal hDC As Long, lpRect As tagRECT) As Integer
  1327. Declare Function cTileBitmapOnWindow Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal lpFilename As String) As Integer
  1328.  
  1329. ' hook keyboard
  1330.  
  1331. Declare Function cInstallHookKeyboard Lib "t2win-32.dll" (ByVal InstallRemove As Integer) As Integer
  1332.  
  1333. ' printer
  1334.  
  1335. Public Const EPJ_SUCCESS = -1
  1336. Public Const EPJ_PRINTER_NAME_EMPTY = 1
  1337. Public Const EPJ_CANT_OPEN_PRINTER = 2
  1338. Public Const EPJ_STRANGE_ERROR = 3
  1339. Public Const EPJ_CANT_ENUMERATE_MORE_JOBS = 4
  1340.  
  1341. Public Const JOB_STATUS_PAUSED = &H1
  1342. Public Const JOB_STATUS_ERROR = &H2
  1343. Public Const JOB_STATUS_DELETING = &H4
  1344. Public Const JOB_STATUS_SPOOLING = &H8
  1345. Public Const JOB_STATUS_PRINTING = &H10
  1346. Public Const JOB_STATUS_OFFLINE = &H20
  1347. Public Const JOB_STATUS_PAPEROUT = &H40
  1348. Public Const JOB_STATUS_PRINTED = &H80
  1349. Public Const JOB_STATUS_DELETED = &H100
  1350. Public Const JOB_STATUS_BLOCKED_DEVQ = &H200
  1351. Public Const JOB_STATUS_USER_INTERVENTION = &H400
  1352.  
  1353. Type tagJOBINFO
  1354.    sPrinterName         As String      'name of the printer for which the job is spooled
  1355.    sMachineName         As String      'name of the machine that created the print job
  1356.    sUserName            As String      'name of the user who owns the print job
  1357.    sDocument            As String      'name of the print job (for example, "MS-WORD: Review.doc")
  1358.    lJobId               As Long        'job identifier value
  1359.    lStatus              As Long        'job status (multiple OR of JOB_STATUS_x)
  1360.    lPriority            As Long        'job priority (1 : minimum; 99 : maximum)
  1361.    lPosition            As Long        'job's position in the print queue
  1362.    lStartTime           As Long        'earliest time that the job can be printed
  1363.    lUntilTime           As Long        'latest time that the job can be printed
  1364.    lTotalPages          As Long        'number of pages required for the job
  1365.    lSize                As Long        'size, in bytes, of the job
  1366.    lTime                As Long        'total time, in seconds, that has elapsed since the job began printing
  1367.    lPagesPrinted        As Long        'number of pages that have printed
  1368.    wYear                As Integer     'year of the job submitted
  1369.    wMonth               As Integer     'month of the job submitted
  1370.    wDay                 As Integer     'day of the job submitted
  1371.    wHour                As Integer     'hour of the job submitted
  1372.    wMinute              As Integer     'minute of the job submitted
  1373.    wSecond              As Integer     'second of the job submitted
  1374. End Type
  1375.  
  1376. Declare Function cEnumPrinterJobs Lib "t2win-32.dll" (ByVal PrinterName As String, JOBINFO As tagJOBINFO, ByVal FirstNext As Integer) As Integer
  1377. Declare Function cPrinterBins Lib "t2win-32.dll" (ByVal PrinterName As String, ByVal PrinterPort As String) As Integer
  1378.  
  1379. ' open files
  1380.  
  1381. Public Const ENUMERATE_ALL_OPEN_FILES = True
  1382. Public Const ENUMERATE_ONLY_OPEN_UNMOVABLE_FILES = False
  1383.  
  1384. Public Const NO_ERROR_OPEN_FILES = True
  1385. Public Const NO_MORE_OPEN_FILES = 0
  1386. Public Const ERROR_LOCK_LOGICAL_VOLUME = 1
  1387. Public Const ERROR_ENUMERATE_OPEN_FILES = 2
  1388. Public Const ERROR_UNLOCK_LOGICAL_VOLUME = 3
  1389. Public Const ERROR_CAN_CONVERT_TO_LONG_NAME = 4
  1390.  
  1391. Declare Function cEnumOpenFiles Lib "t2win-32.dll" (ByVal nDrive As String, ByVal EnumType As Integer, ByVal FirstNext As Integer, OpenFileName As String, OpenFileMode As Long, OpenFileType As Long) As Integer
  1392.  
  1393.